package com.huhu.SpringBean;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

//把普通pojo实例化到spring容器中，相当于配置文件中的<bean id="" class=""/>
@Component
@ConfigurationProperties(prefix="boy")
public class Boy {
 
	private String name;
	private Integer age;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getAge() {
		return age;
	}
	public void setAge(Integer age) {
		this.age = age;
	}
	
	
	
}
